﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Gnosis.Alexandria;
using Gnosis.Alexandria.Views;


namespace Gnosis.Alexandria.Controllers
{
    public class MainController
        : ControllerOldBase
    {
        public MainController(IViewOld view)
            : base(null)
        {
            _view = view;
            _view.Controller = this;
            AddChild(new MainTabController(this));
            AddChild(new RepositoryController(this));
        }

        private readonly IViewOld _view;

        protected override void HandleMessage(IMessageOld message)
        {
            switch (message.Type)
            {
                case MessageTypes.RequestControllerInitialize:
                    break;
                case MessageTypes.RequestMainTabViewLoad:
                    _view.Send(message);
                    break;
                default:
                    break;
            }
        }
    }
}
